<template>
  <!-- 专辑专用 -->
  <div>
    <ul class="AlbumBox">
      <router-link
        tag="li"
        :to="{
          name: 'album',
          query: { id: item.id, uid: item.artists[0].id },
        }"
        class="AlbumItem"
        v-for="item in arr"
        :key="item.id"
      >
        <div class="imgBox">
          <img :src="item.picUrl" alt="" />
          <div class="bgBox"></div>
        </div>
        <p class="AlbumName">{{ item.name }}</p>
        <p class="AlbumTime">{{ item.publishTime | fmtDate("yyyy.MM.DD") }}</p>
      </router-link>
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    arr: {
      type: Array,
      default: () => {
        return [];
      },
    },
  },
};
</script>

<style lang="scss" scoped>
.AlbumBox {
  margin-left: -33px;
  .AlbumItem {
    width: 153px;
    display: inline-block;
    padding: 0 0 30px 33px;
    .imgBox {
      width: 130px;
      height: 130px;
      position: relative;
      img {
        width: 100%;
        height: 100%;
      }
      .bgBox {
        width: 153px;
        height: 130px;
        background: url("./../../assets/imges/background.png") no-repeat 0 -845px;
        position: absolute;
        top: 0;
        left: 0;
      }
    }
    .AlbumName {
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 19px;
      font-size: 14px;
      margin: 8px 0 3px;
      white-space: nowrap;
    }
    .AlbumTime {
      color: #666;
    }
  }
}
</style>